package com.easy.query.test.entity.school.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.entity.school.SchoolStudentAddress;
import com.easy.query.core.proxy.columns.SQLStringColumn;
import com.easy.query.core.proxy.columns.SQLNavigateColumn;
import com.easy.query.core.proxy.columns.SQLAnyColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author xuejiaming
 */
public class SchoolStudentAddressProxy extends AbstractProxyEntity < SchoolStudentAddressProxy, SchoolStudentAddress > {

    private static final Class < SchoolStudentAddress > entityClass = SchoolStudentAddress .class;

    public static SchoolStudentAddressProxy createTable (){
        return new SchoolStudentAddressProxy ();
    }

    public SchoolStudentAddressProxy (){
    }

    /**
     *{@link SchoolStudentAddress#getId}
     */
    public SQLStringColumn < SchoolStudentAddressProxy, java.lang.String> id(){
    return getStringColumn("id", java.lang.String.class);
}

    /**
     *{@link SchoolStudentAddress#getStudentId}
     */
    public SQLStringColumn < SchoolStudentAddressProxy, java.lang.String> studentId(){
    return getStringColumn("studentId", java.lang.String.class);
}

    /**
     *{@link SchoolStudentAddress#getAddress}
     */
    public SQLStringColumn < SchoolStudentAddressProxy, java.lang.String> address(){
    return getStringColumn("address", java.lang.String.class);
}

    /**
     *{@link SchoolStudentAddress#getSchoolStudent}
     */
    public com . easy . query . test . entity . school . proxy . SchoolStudentProxy schoolStudent() {
        return getNavigate(
            "schoolStudent",
            new com . easy . query . test . entity . school . proxy . SchoolStudentProxy ()
        );
    }


    @Override
    public Class < SchoolStudentAddress > getEntityClass (){
        return entityClass;
    }


    /**
     * 数据库列的简单获取
     * @return
     */
    public SchoolStudentAddressProxyFetcher FETCHER =
        new SchoolStudentAddressProxyFetcher (this, null, SQLSelectAsExpression.empty);


    public static class SchoolStudentAddressProxyFetcher extends AbstractFetcher<SchoolStudentAddressProxy, SchoolStudentAddress, SchoolStudentAddressProxyFetcher> {

        public SchoolStudentAddressProxyFetcher (SchoolStudentAddressProxy proxy, SchoolStudentAddressProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression){
        super(proxy, prev, sqlSelectAsExpression);
    }


        /**
         *{@link SchoolStudentAddress#getId}
         */
        public SchoolStudentAddressProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         *{@link SchoolStudentAddress#getStudentId}
         */
        public SchoolStudentAddressProxyFetcher studentId() {
            return add(getProxy().studentId());
        }

        /**
         *{@link SchoolStudentAddress#getAddress}
         */
        public SchoolStudentAddressProxyFetcher address() {
            return add(getProxy().address());
        }


        @Override
        protected SchoolStudentAddressProxyFetcher createFetcher(
            SchoolStudentAddressProxy cp,
            AbstractFetcher<SchoolStudentAddressProxy, SchoolStudentAddress, SchoolStudentAddressProxyFetcher> prev,
            SQLSelectAsExpression sqlSelectExpression
        ) {
            return new SchoolStudentAddressProxyFetcher (cp, this, sqlSelectExpression);
        }
    }

}
